using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;

namespace ThridGroup.ERP.Application.Contracts.DTO
{
    /// <summary>
    /// 点检保养计划DTO
    /// </summary>
    public class MaintenanceplanDto
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjectCode { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 项目类型
        /// </summary>
        public string ProjectType { get; set; }

        /// <summary>
        /// 项目内容
        /// </summary>
        public string ProjectContent { get; set; }

        /// <summary>
        /// 标准
        /// </summary>
        public string Standard { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public string WhethertoEnable { get; set; }
    }

    /// <summary>
    /// 创建/更新点检保养计划DTO
    /// </summary>
    public class CreateUpdateMaintenanceplanDto
    {
        /// <summary>
        /// ID（更新时需要）
        /// </summary>
        public int? Id { get; set; }

        /// <summary>
        /// 项目编码
        /// </summary>
        [Required(ErrorMessage = "项目编码不能为空")]
        [StringLength(50, ErrorMessage = "项目编码最大长度为50个字符")]
        public string ProjectCode { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [Required(ErrorMessage = "项目名称不能为空")]
        [StringLength(100, ErrorMessage = "项目名称最大长度为100个字符")]
        public string ProjectName { get; set; }

        /// <summary>
        /// 项目类型
        /// </summary>
        [Required(ErrorMessage = "项目类型不能为空")]
        public string ProjectType { get; set; }

        /// <summary>
        /// 项目内容
        /// </summary>
        [StringLength(500, ErrorMessage = "项目内容最大长度为500个字符")]
        public string ProjectContent { get; set; }

        /// <summary>
        /// 标准
        /// </summary>
        [StringLength(500, ErrorMessage = "标准最大长度为500个字符")]
        public string Standard { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public string WhethertoEnable { get; set; } = "是";

        /// <summary>
        /// 是否自动生成编码
        /// </summary>
        public bool AutoGenerateCode { get; set; } = false;
    }

    /// <summary>
    /// 查询点检保养计划DTO
    /// </summary>
    public class QueryMaintenanceplanDto : PagedAndSortedResultRequestDto
    {
        /// <summary>
        /// 项目编码（模糊查询）
        /// </summary>
        public string ProjectCode { get; set; }

        /// <summary>
        /// 项目名称（模糊查询）
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 项目类型
        /// </summary>
        public string ProjectType { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public string WhethertoEnable { get; set; }
    }
} 